package com.sptpc.springbootmybatis.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sptpc.springbootmybatis.dao.OrderDetailMapper;
import com.sptpc.springbootmybatis.dao.OrderMapper;
import com.sptpc.springbootmybatis.dao.SellMapper;
import com.sptpc.springbootmybatis.model.Order;
import com.sptpc.springbootmybatis.model.SellKey;
import com.sptpc.springbootmybatis.util.DateUtil;
import com.sptpc.springbootmybatis.util.OrderState;
import com.sptpc.springbootmybatis.vo.OrderDetail;
import com.sptpc.springbootmybatis.vo.OrderVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;

public class OrderService {

    @Autowired
    private OrderMapper orderMapper;
    @Autowired
    private SellMapper sellMapper;
    @Autowired
    private OrderDetailMapper orderDetailMapper;

    //分页
    public PageInfo findAllByPage(int pageNum, int pageSize){
        PageHelper.startPage(pageNum,pageSize);//表示从pageNum页开始，每页pageSize条数据
        List<OrderDetail> orderDetailList = orderDetailMapper.selectAll();
        PageInfo pageInfo = new PageInfo(orderDetailList);
        return null;
    }
}
